#include <stdio.h>
int main()
{
    int i=1,j,r;
    while (i <= 5)
    {
    	r=1;
    	while (r<=(5-i))
    	{
    		printf(" ");
    		r++;
		}
        j=1;
        while (j <= i )
        {
            printf("%d",j);
            j++;
        }
        printf("\n");
        i++;
    }
    return 0;
}
